package com.zzzzzz.app.topic.model.bo;

import java.text.SimpleDateFormat;

import com.zzzzzz.app.account.model.po.User;
import com.zzzzzz.app.topic.model.po.Topic;

public class TopicBo {
	
	public TopicBo(Topic topic, User user) {
		_topic = topic;
		_user = user;
	}
	
	private Topic _topic;
	
	private User _user;
	
	public Long getUserId() {
		return _topic.getUserId();
	}
	
	public Long getTopicId() {
		return _topic.getTopicId();
	}

	public String getTitle() {
		return _topic.getTitle();
	}

	public String getContent() {
		return _topic.getContent();
	}

	public String getCreateDate() {
		return format.format(_topic.getCreateDate());
	}
	
	public String getCreateBy() {
		return _user.getUsername();
	}

	public SimpleDateFormat format = new SimpleDateFormat("MMM dd, yyyy 'at' hh:mm a");
}
